/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

// Value not currently consumed by Side nav component
$ouiSideNavBackgroundColor: $ouiColorEmptyShade !default; // sass-lint:disable-line no-color-literals

$ouiSideNavEmphasizedBackgroundColor: transparentize($ouiColorPrimary, .8) !default;

// Simulates the transparent backround on top of the page background to get an opaque color
// in order to get the right contrast for text
@function ouiSideNavEmphasizedContrast($textColor, $ratio: $ouiContrastRatioText) {
  $backgroundColorSimulated: mix($ouiPageBackgroundColor, $ouiColorLightShade, 70%);
  $color: makeHighContrastColor($textColor, $backgroundColorSimulated, $ratio);
  @return $color;
}

// Ensure all the possible text color have proper contrast when "emphasized"
$ouiSideNavRootTextcolor: ouiSideNavEmphasizedContrast($ouiTitleColor) !default;
$ouiSideNavBranchTextcolor: ouiSideNavEmphasizedContrast($ouiTextSubduedColor) !default;
$ouiSideNavSelectedTextcolor: ouiSideNavEmphasizedContrast($ouiColorPrimary) !default;
$ouiSideNavDisabledTextcolor: ouiSideNavEmphasizedContrast($ouiButtonColorDisabledText, $ouiContrastRatioDisabled) !default;


/* OUI -> EUI Aliases */
$euiSideNavBackgroundColor: $ouiSideNavBackgroundColor;
$euiSideNavEmphasizedBackgroundColor: $ouiSideNavEmphasizedBackgroundColor;
$euiSideNavRootTextcolor: $ouiSideNavRootTextcolor;
$euiSideNavBranchTextcolor: $ouiSideNavBranchTextcolor;
$euiSideNavSelectedTextcolor: $ouiSideNavSelectedTextcolor;
$euiSideNavDisabledTextcolor: $ouiSideNavDisabledTextcolor;
@function euiSideNavEmphasizedContrast($textColor, $ratio: $ouiContrastRatioText) { @return ouiSideNavEmphasizedContrast($textColor, $ratio); }
/* End of Aliases */
